package com.egghiro.j2se.game.sace.device.factory.bulletfactory;

import com.egghiro.framework.j2se.game.core.model.actor.IActor2D;
import com.egghiro.j2se.game.sace.model.actor.FlyerComponent;

public abstract class FlyerFactory {
    // private FlyerComposite flyerComposite;
    //
    // public FlyerFactory(FlyerComposite flyerComposite) {
    // this.flyerComposite = flyerComposite;
    // }
    //
    // public void addFlyer(int x, int y, double angle, Actor2D target) {
    // synchronized (flyerComposite) {
    // this.flyerComposite.add(createFlyer(x, y, angle, target));
    // // createFlyer(x, y, angle, target, this.flyerList);
    // }
    //
    // }
    //
    // public void addFlyer(int x, int y, double startAngle, double arcAngle,
    // double angleStep, Actor2D target) {
    // // this.flyerList.addAll(createFlyer(x, y, startAngle,
    // // arcAngle,angleStep, target, this.flyerList));
    // synchronized (flyerComposite) {
    // // createFlyer(x, y, startAngle, arcAngle, angleStep, target,
    // // this.flyerList);
    // this.flyerComposite.add(createFlyer(x, y, startAngle, arcAngle,
    // angleStep, target));
    // }
    // }

    /**
     * 创建单个对象
     *
     * @return
     */
    public abstract FlyerComponent createFlyer(int x, int y, double angle, IActor2D target);

    public abstract FlyerComponent createFlyer(int x, int y, double angle, IActor2D target, long life);

    public abstract FlyerComponent createFlyer(int x, int y, double startAngle, double arcAngle, double angleStep,
            IActor2D target);

    public abstract FlyerComponent createFlyer(int x, int y, double startAngle, double arcAngle, double angleStep,
            IActor2D target, long life);
}
